#include <stdio.h>
#include <string.h>
#include <assert.h>

void reverseString(char* s, int left, int right) 
{
	assert(s);
	while (left < right)
	{
		char tmp = s[left];
		s[left++] = s[right];
		s[right--] = tmp;
	}
}

char* reverseWords(char* s) 
{
	assert(s);
	int left = 0;
	int right = 0;
	int len = strlen(s);
	while (right <= len)
	{
		while (right < len && s[right] != ' ')
			right++;
		right--;
		reverseString(s, left, right);
		right += 2;
		left = right;
	}
}

int main()
{

	return 0;
}